package com.abst;

public class Clerk extends Employee {
    private Manager manager;


    public Clerk() {
    }

    public Clerk(String name, String workId, String department, Manager manager) {
        super(name, workId, department, 5000);
        this.manager = manager;
    }

    public Manager getManager() {
        return manager;
    }

    public void setManager(Manager manager) {
        this.manager = manager;
    }

    @Override
    public String showMsg() {
        return this.getDepartment() + ": " + this.getName() + ", 员工编号：" + this.getWorkId() + "工资：" + getSarary() +
                "\n" + "他的经理为：" + this.manager.getName();
    }

    @Override
    public String toString() {
        return showMsg();

    }
}
